/**
 * Created by HP on 2017/10/31.
 */
var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var moment = require('moment');
// console.log(moment().format());
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var schema = new mongoose.Schema({
	filedname:String,
	originalname:String,
	encoding:String,
	 mimetype:String,
	destination:String,
	filename:String,
	path:String,
	size:String,
	date:{ type: Date, default: Date.now() },
	cateId:ObjectId,
	
})

schema.plugin(mongoosePaginate);

var Upload = mongoose.model('Upload',schema,'upload');
module.exports = Upload;